<include file="Common:header" />
<css file="__PUBLIC__/Admin/css/part.css"/>
<js file="__PUBLIC__/Admin/js/css3.js"/>
</head>
<script>
    var url ="__URL__";
    var  APP= "__APP__";
    var ROOT = "__ROOT__";
    $(function(){
        //点击删除
        $('.delpart').live('click',function(){
            if(!window.confirm('确定删除？')){
                return false;
            }
            var id = $(this).attr('name');
            var _this = $(this);
            $.get(url+'/delPart&id='+id,function(data){
                if(data.num==1){
                    _this.parent().parent().remove();
                    alert(data.error);
                }else{
                    alert(data.error);   
                }
            },'json')
        })
    })
</script>
<js file="__PUBLIC__/Admin/js/part.js"/>
    <body>
        <div class="top_addres">

            <div class="addres">商品分类</div>
            <span class="middle_bottom">|</span>
            <a class="addsection" href="{:U('addClass')}"><span class="gtubiao"></span>添加分类</a> 
        </div>
        <input type="hidden" value="0" name="path">
        <table class="table1" cellspacing="0">
            <tr>
                <th style="width:60px">ID</th>
                <th>栏目名</th>
                <th style="width:100px">所属栏目</th>
                <th>子栏目数</th>
                <th style="width:300px">操作</th>
            </tr>
            <foreach name="classData" item='n'>
            <tr>
                <td><span class="whoid">{$n.cid}</span></td>
                <td class="partname"><a href="javascript:;" pid="{$n.cid}" num='2' class="tjia"><span  class="jia xiala"></span>{$n.classname}</a></td>
                <td width="150"><span class="whopart">顶级栏目</span></td>
                <td width="100">{$n.partnum}</td>
                <td>&nbsp;<a href='javascript:;' name="{$n.id}" class='delpart'>删除</a> |
                    <a href="__ROOT__/index.php?c=Index&m=part&id={$n.id}" target='_blank'>预览</a> |
                    <a href="{:U('addClass',array('cid'=>$n['cid']))}" class='childpart'>添加子栏目</a>  
                    | <a href="__CONTROL__/gedit&id={$n.id}">修改</a>
                </td>
            </tr>
            </foreach>
            <!--请求数据时-->
            <div class="beforeajax"></div>
        </table>
    </body>
</html>
